<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>   
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>  
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>       
<c:set var="ctx" value="${pageContext.request.contextPath}"/> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="../include.jsp"/>
<script type="text/javascript">
	
	$(function() {
		initCombogird();
	});
	
	function initCombogird(){
		$('#cc').combogrid({    
		    panelWidth:'45%',
		    panelHeight:'60%',
		    value:'${routeCustomer.lcnsCode}',    		      
		    textField:'lcns_code',
		    striped:true,
		    nowrap:true,
			idField:'lcns_code',
			pagination:true,
			rownumbers: true, //是否加行号 
			//fit:true,
		    url:'${ctx}/customer/listTMdmCstr',    
		    columns:[[	
				 {field:'lcns_code',title:'专卖证号',width:150,align:'left'},
	    		 {field:'cstr_name',title:'店铺名称',width:150,align:'left'},	    		
	    		 {field:'crpn_name',title:'法人姓名',width:100,align:'center'},	    		
	    		 {field:'status',title:'零售户状态',width:100,align:'center',formatter:formatterStatus},
	    		 {field:'link_man_name',title:'联系人姓名',width:80,align:'center'},
	    		 {field:'link_man_phone',title:'联系电话',width:100,align:'center'}	    		
			]],			
			rowStyler: function(index,row){
				var statusPK = row.pk_bsns_stts;
				if(statusPK=="2702"){//背景色显示
					return 'background-color:#CCFFFF;';
                }
                else if(statusPK=="2703"){
                	return 'background-color:#FF0000;';
                }
                else if(statusPK=="2701"){
                	return 'background-color:#FFFF00;';
                }else{
                	return 'background-color:#0000FF;';
                }
			},
			toolbar:[
		     	{text: '专卖证号:<input type="text" id="lcnsCode"/>'},
		     	{text: '店铺名称:<input type="text" id="cstr_name"/>'},
		     	{text: '搜索',iconCls: 'icon-search',
			     	handler: function(){
			     		doSearch();
			     	}
				},
				{text: '重置',iconCls: 'icon-reload',
			     	handler: function(){
			     		reset();
			     	}
				}
			]
		});  

	}
</script>
</head>
<body>
	<div class="easyui-layout" data-options="fit:true,border:false">
		<div data-options="region:'center',border:false" title="" style="overflow: hidden;">			
			<form id="form" method="post">
				<input name="moduleId" type="hidden" value="${moduleId}">	
	            <div style="margin-bottom:15px;padding-top:10px;padding-left:30px">
	            	<input id="cc" class="easyui-textbox" name="lcnsCode" value="${routeCustomer.lcnsCode}" style="width:70%" data-options="label:'选择零售户:',required:true">
	            </div>
	            
	        </form>
		</div>
	</div>
</body>
</html>